<script type="text/javascript">
    function redirect_user(user){
        location.href='/social/user/'+user+'/data/'
    }
    
    function redirect_group(group){
      location.href='/social/group/'+group+'/data/'
   }
</script>



{% url user_create as url_user_create %}
<form action="{{ url_user_create }}" method="POST">
    Crear usuario:<br>
    <label>Username</label>*:<input type="text" name="username"/><br>
    <label>Password</label>*:<input type="password" name="password"/><br>
    <label>Nombre</label>:<input type="text" name="first_name"/><br>
    <label>Apellidos</label>:<input type="text" name="last_name"/><br>
    <label>Correo-e</label>:<input type="text" name="email"/><br>
    <label>Longitude</label>:<input type="text" name="longitude"/><br>
    <label>Latitude</label>:<input type="text" name="latitude"/><br>
    <input type="submit" value="Enviar" />
</form>


{% url user_login as url_user_login %}
<form action="{{ url_user_login }}" method="POST">
   Login:<br>
   <label>Nombre</label>*:<input type="text" name="username"/><br>
    <label>Password</label>*:<input type="password" name="password"/><br>
   <input type="submit" value="Enviar" />
</form>

{% url user_set_status as url_user_set_status %}
<form action="{{ url_user_set_status }}" method="POST">
   Estado:<br>
   <label>Estado</label>:<input type="text" name="status"/><br>
   <input type="submit" value="Enviar" />
</form>

{% url user_pos as url_user_pos %}
<form action="{{ url_user_pos }}" method="POST">
    Establecer posición:<br>
    <label>Longitude</label>:<input type="text" name="longitude"/><br>
    <label>Latitude</label>:<input type="text" name="latitude"/><br>
    <input type="submit" value="Enviar" />
</form>

<form name="userData" action='javascript:redirect_user(document.userData.userid.value);'>
   Datos usuario:<br>
   <label>Id</label>:<input type="text" name="userid"/><br>
   <input type="submit" value="Enviar" />
</form>

{% url user_delete as url_user_delete %}
<form action="{{ url_user_delete }}" method="POST">
   Borrar usuario:<br>
   <label>Id</label>:<input type="text" name="userid"/><br>
   <input type="submit" value="Enviar" />
</form>

{% url user_relation as url_user_relation %}
<form action="{{ url_user_relation }}" method="POST">
   Amistad:<br>
   <label>Id1</label>:<input type="text" name="userid1"/><br>
    <label>Id2</label>:<input type="text" name="userid2"/><br>
   <input type="submit" value="Enviar" />
</form>

{% url user_relation_delete as url_user_relation_delete %}
<form action="{{ url_user_relation_delete }}" method="POST">
   Borrar amistad:<br>
   <label>Id1</label>:<input type="text" name="userid1"/><br>
   <label>Id2</label>:<input type="text" name="userid2"/><br>
   <input type="submit" value="Enviar" />
</form>

{% url group_create as url_group_create %}
<form action="{{ url_group_create }}" method="POST">
   Crear grupo:<br>
   <label>Nombre grupo</label>:<input type="text" name="groupname"/><br>
   <input type="submit" value="Enviar" />
</form>

<form name="groupData" action='javascript:redirect_group(document.groupData.groupid.value);'>
   Datos grupo:<br>
   <label>Id</label>:<input type="text" name="groupid"/><br>
   <input type="submit" value="Enviar" />
</form>

{% url group_delete as url_group_delete %}
<form action="{{ url_group_delete }}" method="POST">
   Borrar grupo:<br>
   <label>Id grupo</label>:<input type="text" name="groupid"/><br>
   <input type="submit" value="Enviar" />
</form>

{% url group_join as url_group_join %}
<form action="{{ url_group_join }}" method="POST">
   Unirse a un grupo:<br>
   <label>Id grupo</label>:<input type="text" name="groupid"/><br>
   <label>Id nuevo miembro</label>:<input type="text" name="userid"/><br>
   <input type="submit" value="Enviar" />
</form>

{% url group_unjoin as url_group_unjoin %}
<form action="{{ url_group_unjoin }}" method="POST">
   Borrarse de un grupo:<br>
   <label>Id grupo</label>:<input type="text" name="groupid"/><br>
   <label>Id miembro</label>:<input type="text" name="userid"/><br>
   <input type="submit" value="Enviar" />
</form>

{% url create_note as url_create_note %}
<form action="{{ url_create_note }}" method="POST">
   Crear una nota:<br>
    <label>Titulo</label>:<input type="text" name="title"/><br>
   <label>Texto</label>:<br/>
    <textarea name="text"></textarea><br/>
   <label>Latitude</label>:<input type="text" name="latitude"/><br>
    <label>Longitude</label>:<input type="text" name="longitude"/><br>
   <input type="submit" value="Enviar" />
</form>

{% url note_delete as url_note_delete%}
    <form action="{{ url_note_delete }}" method="POST">
      Borrar una nota:
        <table>
            <tr><th><label for="id_noteid">Note id</label>:</th><td><input
                    type="text" name="noteid" id="id_noteid"></td></tr>
        </table>
        <p><input type="submit" value="Enviar"></p>
    </form>

{% url photo_upload as url_photo_upload%}
    <form action="{{ url_photo_upload }}" method="POST" enctype="multipart/form-data">
      Enviar una foto:
        <table>
            {{ photo_form.as_table }}
            <tr><th><label for="id_desc">Description</label>:</th><td><textarea name="description"></textarea></td></tr>
            <tr><th><label for="id_lat">Latitude</label>:</th><td><input type="text" name="latitude" /></td></tr>
            <tr><th><label for="id_long">Longitude</label>:</th><td><input type="text" name="longitude" /></td></tr>
        </table>
        <p><input type="submit" value="Enviar"></p>
    </form>

{% url photo_delete as url_photo_delete%}
    <form action="{{ url_photo_delete }}" method="POST">
      Borrar una foto:
        <table>
            <tr><th><label for="id_photoid">Photo id</label>:</th><td><input
                    type="text" name="photoid" id="id_photoid"></td></tr>
        </table>
        <p><input type="submit" value="Enviar"></p>
    </form>

{% url sound_upload as url_sound_upload%}
    <form action="{{ url_sound_upload }}" method="POST" enctype="multipart/form-data">
      Enviar un sonido:
        <table>
            {{ sound_form.as_table }}
            <tr><th><label for="id_desc">Description</label>:</th><td><textarea name="description"></textarea></td></tr>
            <tr><th><label for="id_lat">Latitude</label>:</th><td><input type="text" name="latitude" /></td></tr>
            <tr><th><label for="id_long">Longitude</label>:</th><td><input type="text" name="longitude" /></td></tr>
        </table>
        <p><input type="submit" value="Enviar"></p>
    </form>

{% url sound_delete as url_sound_delete%}
    <form action="{{ url_sound_delete }}" method="POST">
      Borrar un sonido:
        <table>
            <tr><th><label for="id_soundid">Sound id</label>:</th><td><input
                    type="text" name="soundid" id="id_soundid"></td></tr>
        </table>
        <p><input type="submit" value="Enviar"></p>
    </form>

<hr/><!-- ------------------------------------------------------------------------- -->
{% url change_privacy as url_change_privacy %}
<form action="{{ url_change_privacy }}" method="POST">
   Change node permissions:<br>
   <label>Perm</label>:<select type="text" name="perm">
               <option value=""></option>
               <option value="Private">Private</option>
               <option value="Friends">Friends</option>
               <option value="Friends_of_friends">Friends of friends</option>
	       <option value="Public">Public</option>
               <option value="fake">fake</option>
               </select>
               <br>          
   <input type="submit" value="Enviar" />
</form>

{% url node_change_privacy as url_node_change_privacy %}
<form action="/social/node/1239/privacy/change/" method="POST">
   Change node permissions:<br>
   <label>Perm</label>:<select type="text" name="perm">
               <option value=""></option>
               <option value="Private">Private</option>
               <option value="Friends">Friends</option>
               <option value="Friends_of_friends">Friends of friends</option>
	       <option value="Public">Public</option>
               <option value="fake">fake</option>
               </select>
               <br>       
    
   <label>Field</label>:<select type="text" name="field">
               <option value="position">position</option>
               
               </select>
               <br>
    <label>Id:</label><input type="text" name="node_id" id="node_id"/><br>    
   <input type="submit" value="Enviar" />
</form>

<hr/><!-- ------------------------------------------------------------------------- -->
<h2>Semantic Module</h2>

{% url similarSemantic as similar_semantic %}
<form action="{{ similar_semantic }}" method="GET">
    How similarity are these two words:<br>
    <label>Word1</label>:<input type="text" name="word1"/><br>
    <label>Word2</label>:<input type="text" name="word2"/><br>
    <input type="submit" value="Send" />
</form>

{% url socialSemanticSearch as semantic_search %}
<form action="{{ semantic_search }}" method="GET">
    Semantic search in different social nodes:<br>
    <label>Search</label>:<input type="text" name="word"/><br>
    <label>Sense</label>:<input type="text" name="sense" value="0"/><br>
	<INPUT TYPE=CHECKBOX NAME="checkPhotos" CHECKED value="True" >Photos<BR>
	<INPUT TYPE=CHECKBOX NAME="checkNotes"  value="True" >Notes<BR>
    <input type="submit" value="Send" />
</form>

{% url compareNodesSemantic as compare_nodes %}
<form action="{{ compare_nodes }}" method="GET">
    Compare social nodes:<br>
    <label>Distance Min</label>:<input type="text" name="min"/><br>
    <input type="submit" value="Send" />
</form>


#}
